package com.cheri.keller.controller;

import com.cheri.keller.common.response.Response;
import com.cheri.keller.common.response.ResultData;
import com.cheri.keller.mapper.TestTableMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

/**
 * @author Aaron Du
 * @version V1.0
 * @date 2020/5/23 19:30
 **/
@CrossOrigin(origins = "*",allowedHeaders="*", maxAge = 3600)
@RestController
@RequestMapping("/testTable")
public class TestTableController {
    @Autowired
    TestTableMapper mapper;
    @RequestMapping("/all")
    @PostMapping
    public String getAll(@RequestParam("taskIds") Long taskIds) {
        List<Long> longs = Arrays.asList(taskIds);
        int resultData = mapper.batchUpdate("1",longs,"0");
        return JsonResourceUtils.readJsonFile("H:\\SoftwareDev\\LearningSpace\\keller\\src\\main\\resources\\config\\json.json");

    }
}
